package utils
import (
	"time"
	"github.com/name5566/leaf/log"
	"github.com/name5566/leaf/timer"
)

func AnsycCall() {

}
func Timer(sec time.Duration, cb func()) {
	log.Debug("StartTimer: %v", sec)
	d := timer.NewDispatcher(10)

	// timer 1
	d.AfterFunc(sec * time.Second, cb)

	(<-d.ChanTimer).Cb()
}